export default (params) => {
	const baseUrl = "https://sino-sources.com";
	let head = {};
	// 配置请求头
	// head["authorization"] = uni.getStorageSync("token");
	head["content-type"] = "application/x-www-form-urlencoded";
	return new Promise((resolve, reject) => {
		wx.request({
			...params,
			url: baseUrl + params.url,
			header: head,
			success: (res) => {
				if (res.statusCode === 200) {
					resolve(res.data);
				} else {
					resolve(res.statusCode)
				}
			},
			fail: (err) => {
				reject(err);
			},
			complete: () => {},
		});
	});
};
